<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改权限</title>
<%@ include file="/common/jsp/taglibs.jsp" %>
<%@ include file="/common/jsp/headerScriptCss.jsp" %>
<script type="text/javascript">
function toSubmit(){
        $("#purview").ajaxSubmit({
            url:'${ctx }/purview/update',
            type:"POST",
            dataType:'json',
            success:function(data){
                if(data.status=='success'){
                    setTimeout(function(){
                        $.dialog.close();
                    },600);
                    showSuccess($("#main",window.parent.document));
                }else{
                    setTimeout(function(){
                        $.dialog.close();
                    },600);
                    showError($("#main",window.parent.document));
                }
                
            }           
        }); 
    }
</script>
</head>
<body  class="dialogBody">
      <form id="purview">
            <input type="hidden" name="id" value="${purview.id }">
       <p>
         <label>菜单名称:</label>
         <input name="name"  value="${purview.name }"  class="sf"/>
       </p>
       <p>
         <label>访问URL:</label>
         <input name="url" value="${purview.url }"  class="sf"/>
       </p>
       <p>
         <label>级别:</label>
         <select name="level"  class="dropdown">
            <option <c:if test="${purview.level=='1' }">selected="selected"</c:if> value="1">1</option>
            <option <c:if test="${purview.level=='2' }">selected="selected"</c:if> value="2">2</option>
            <option <c:if test="${purview.level=='3' }">selected="selected"</c:if> value="3">3</option>
         </select>
       </p>
       <p style="text-align:center;">
         <input type="button" class="button"  value="提交" onclick="toSubmit();">
         <input type="reset" class="button" value="重置">
       </p>
       </form>      
</body>
</html>